
import {createStore} from "vuex";
export default createStore({
    state: {
        isPlay: '',
        SongInfo: '',
        SongNode:''
    },
    mutations: {
        //修改状态
        changeState(state,isplay=true){
            state.isPlay=isplay
        },
        //歌曲id
        sendID(state,SongInfo){
            state.SongInfo=SongInfo
        },
        //
        setSongNode(state,node){
            state.SongNode=node
        }
    },
    getters:{
        //获取状态
        isPlay(state){
            return state.isPlay
        },
        //获取歌曲id
        getSongId(state){
            return state.SongId
        },
        getSongNode(state){
            return state.SongNode
        }
    }
})